package com.woniuxy.classdeans.controller;

import com.woniuxy.classdeans.sender.GradeSender;
import com.woniuxy.commons.entity.wyh.DivideClasses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @Author weizihan
 * @Date 2020/7/20 2020/7/20
 * @Description 处理特殊业务模块
 * @Since version-1.0
 */
@RestController
@RequestMapping("/special")
public class SpecialController {
    @Autowired
    private GradeSender gradeSender;
    //处理分班
    @RequestMapping("/divideClass")
    public String divideClassMethod(String endTime,String beginTime){
        System.out.println(endTime+"************"+beginTime);
        //使用mq发送分班通知到学生
        gradeSender.send(new DivideClasses().setBeginTime(beginTime).setEndTime(endTime).setTeamType("高二新生开始在时间内分班"));
        return "ass";
    }
}
